package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.TeachingDesign;
import org.apache.ibatis.annotations.Param;

/**
 * 教学设计主Mapper接口
 *
 * @author tyro
 * @date 2025-05-29
 */
public interface TeachingDesignMapper
{
    /**
     * 查询教学设计主
     *
     * @param id 教学设计主主键
     * @return 教学设计主
     */
    public TeachingDesign selectTeachingDesignById(Long id);

    /**
     * 查询教学设计主列表
     *
     * @param teachingDesign 教学设计主
     * @return 教学设计主集合
     */
    public List<TeachingDesign> selectTeachingDesignList(TeachingDesign teachingDesign);

    /**
     * 新增教学设计主
     *
     * @param teachingDesign 教学设计主
     * @return 结果
     */
    public int insertTeachingDesign(TeachingDesign teachingDesign);

    /**
     * 修改教学设计主
     *
     * @param teachingDesign 教学设计主
     * @return 结果
     */
    public int updateTeachingDesign(TeachingDesign teachingDesign);

    /**
     * 删除教学设计主
     *
     * @param id 教学设计主主键
     * @return 结果
     */
    public int deleteTeachingDesignById(Long id);

    /**
     * 批量删除教学设计主
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTeachingDesignByIds(Long[] ids);

    /**
     * 查询指定班级指定教师最新的教学设计版本
     * @param classId
     * @param teacherId
     * @return
     */
    Long selectLatestVersionByClassAndTeacher(@Param("classId") Long classId,@Param("teacherId") Long teacherId);
}
